﻿using System;
using GeoAPI.Geometries;

namespace YJKGridTopologyCal.Algorithm
{
	public class SimplePointInRing : IPointInRing
	{
		public SimplePointInRing(ILinearRing ring)
		{
			this.pts = ring.Coordinates;
		}

		public bool IsInside(Coordinate pt)
		{
			return CGAlgorithms.IsPointInRing(pt, this.pts);
		}

		private readonly Coordinate[] pts;
	}
}
